﻿@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_LayoutEdit.cshtml";
}
@section scripts
{<script src="~/Areas/bas/ViewModels/viewModel.basCompany.edit.js" type="text/javascript"></script>
    <script type="text/javascript">
        var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
        var viewModel = viewModel.basCompany.edit;
        ko.bindingViewModel(new viewModel(data));
    </script>
}
<div class="master">
    <table class="form">
        <tr>
            <td class="lbl">
                Company Code
            </td>
            <td class="val">
                <input type="text" data-bind="value:form.company_code" />
            </td>
            <td class="lbl">
                Company Name
            </td>
            <td class="val">
                <input type="text" data-bind="value:form.company_name" />
            </td>
            <td class="lbl">
                Remark
            </td>
            <td class="val">
                <input type="text" data-bind="value:form.remark" />
            </td>
        </tr>
        <tr>
            <td class="lbl">
                State
            </td>
            <td class="val">
                <input type="text" data-bind="value:form.state" />
            </td>
            <td class="lbl">
                Creation User
            </td>
            <td class="val">
                <input type="text" data-bind="value:form.creation_userid" />
            </td>
            <td class="lbl">
                Creation Date
            </td>
            <td class="val">
                <input type="text" data-bind="value:form.creation_date" />
            </td>
        </tr>
        <tr>
            <td class="lbl">
                Update User
            </td>
            <td class="val">
                <input type="text" data-bind="value:form.update_userid" />
            </td>
            <td class="lbl">
                Update Date
            </td>
            <td class="val">
                <input type="text" data-bind="value:form.update_date" />
            </td>
            <td class="lbl">
            </td>
            <td class="val">
            </td>
        </tr>
    </table>
</div>
<div class="detail" style="width: 100%; height: 200px;">
    <table id="dgDepartment" data-bind="datagrid:gridDep">
        <thead>
            <th field="department_code" width="150" editor="{type:'validatebox',options:{required:true}}">
                Department Code
            </th>
            <th field="department_name" width="150" editor="{type:'validatebox',options:{required:true}}">
                Department Name
            </th>
            <th field="remark" width="150" editor="text">
                Remark
            </th>
        </thead>
    </table>
</div>
